package com.zhouzj.task.springcloud.email;

import cn.hutool.extra.mail.MailUtil;
import org.springframework.web.bind.annotation.*;

/**
 * @Author: zhouzhijun
 * @Date: 2021/8/5 16:13
 */
@RestController
@RequestMapping("/email")
public class EmailController {

    @GetMapping("/{email}/{code}")
    public Boolean send(@PathVariable("email") String email, @PathVariable("code") String code) {
        MailUtil.send(email,"验证码","验证码："+code,false);
        return Boolean.TRUE;
    }
}
